Recovery Console commands

The following commands can be used with the Recovery Console. For more information about each command, type the command name followed by /? in the Recovery Console.

For more information about the Recovery Console, see "Tools for Troubleshooting" at the Microsoft Windows Resource Kits Web site. (http://www.microsoft.com/)

  • Attrib

    • Changes the attributes of a file or directory.

  • Batch

    • Executes the commands specified in the text file.

  • Bootcfg

    • Boot file (boot.ini) configuration and recovery.

  • ChDir (Cd)

    • Displays the name of the current directory or changes the current directory.

  • Chkdsk

    • Checks a disk and displays a status report.

  • Cls

    • Clears the screen.

  • Copy

    • Copies a single file to another location.

  • Delete (Del)

    • Deletes one or more files.

  • Dir

    • Displays a list of files and subdirectories in a directory.

  • Disable

    • Disables a system service or a device driver.

  • Diskpart

    • Manages partitions on your hard drives.

  • Enable

    • Starts or enables a system service or a device driver.

  • Exit

    • Exits the Recovery Console and restarts your computer.

  • Expand

    • Extracts a file from a compressed file.

  • Fixboot

    • Writes a new partition boot sector onto the system partition.

  • Fixmbr

    • Repairs the master boot record of the partition boot sector.

  • Format

    • Formats a disk.

  • Help

    • Displays a list of the commands you can use in the Recovery Console.

  • Listsvc

    • Lists the services and drivers available on the computer.

  • Logon

    • Logs on to an Windows operating system installation.

  • Map

    • Displays the drive letter mappings.

  • Mkdir (Md)

    • Creates a directory.

  • More (Type)

    • Displays a text file.

  • Rename (Ren)

    • Renames a single file.

  • Rmdir (Rd)

    • Deletes a directory.

  • Set

    • Displays and sets environment variables.

  • Systemroot

    • Sets the current directory to the systemroot directory of the system you are currently logged on to.


Recovery Console overview

If Safe Mode and other startup options do not work, consider using the Recovery Console. This method is recommended only if you are an advanced user who can use basic commands to identify and locate problem drivers and files. In addition, you will need the password for the built-in administrator account to use the Recovery Console.

Using the Recovery Console, you can enable and disable services, format drives, read and write data on a local drive (including drives formatted to use NTFS), and perform many other administrative tasks. The Recovery Console is particularly useful if you need to repair your system by copying a file from a floppy disk or CD-ROM to your hard drive, or if you need to reconfigure a service that is preventing your computer from starting properly.

Important

  • XOX

There are two ways to start the Recovery Console:

  • If you are unable to start your computer, you can run the Recovery Console from your Setup CD.
  • As an alternative, you can install the Recovery Console on your x86-based computer to make it available in case you are unable to restart Windows. You can then select the Recovery Console option from the list of available operating systems on when you start your computer. You cannot install the Recovery Console on an Itanium-based computer.

After you start the Recovery Console, you will have to choose which installation you want to log on to (if you have a dual-boot or multiple-boot system), and you will have to log on with the password for the built in administrator account for that installation.

The console provides commands you can use to do simple operations such as changing to a different directory or viewing a directory, as well as more powerful operations such as fixing the boot sector. You can access Help for the commands in the Recovery Console by typing help at the Recovery Console command prompt.

For more information about the Recovery Console, see "Tools for Troubleshooting" at the Microsoft Windows Resource Kits Web site.(http://www.microsoft.com/)

For more information about securing your computer, see Best practices.

Note

  • Installation of the Recovery Console provides an alternate method for logging on to the computer. This could potentially provide a method for an intruder to gain access to the computer by circumventing many of the built-in safeguards. Consider the potential security effects before installing the Recovery Console.


Delete the Recovery Console

Microsoft Windows graphic

To delete the Recovery Console

  1. Open My Computer.
  2. Double-click the hard drive on which you installed the Recovery Console.
  3. On the Tools menu, click Folder Options.
  4. Click the View tab.
  5. Click Show hidden files and folders, clear the Hide protected operating system files check box, and then click OK. If you receive a warning about displaying protected system files, click Yes to continue.
  6. At the root directory, delete the \Cmdcons folder.
  7. At the root directory, delete the file Cmldr.
  8. Click Start, then Control Panel, then click System.
  9. On the Advanced tab under Startup and Recovery, select Settings.
  10. On the Startup and Recovery dialog box, under System startup, select Edit to edit the startup options file manually. Boot.ini will display in Notepad.
  11. Remove the entry for the Recovery Console. It will look similar to this:

    C:\cmdcons\bootsect.dat="Microsoft Windows Recovery Console" /cmdcons

  12. Save the file and close it.

Caution

  • Modifying the Boot.ini file incorrectly may prevent your computer from restarting. Be sure to delete only the entry for the Recovery Console.

Notes

  • XOX
  • XOX
  • You can only install the Recovery Console feature on x86-based computers.

Related Topics


Install the Recovery Console as a startup option on an x86-based computer

Microsoft Windows graphic

To install the Recovery Console as a startup option on an x86-based computer

  1. With Windows running, insert the Setup CD into your CD-ROM drive.
  2. Click Start and select Run.
  3. Type the following where D: is the CD-ROM drive letter:

    D:\i386\winnt32.exe /cmdcons

  4. Follow the instructions on the screen.

Notes

  • XOX
  • You can only install the Recovery Console on x86-based computers.
  • To run the Recovery Console, you must restart your computer and select the Recovery Console option from the list of available operating systems.
  • To see the commands available on the Recovery Console, type help at the at the console prompt.
  • If your computer will not start, you can run the Recovery Console from the Setup CD. See Related Topics for information on running the Recovery Console when your computer will not start.

Related Topics


Start the computer and use the Recovery Console on an x86-based or Itanium architecture-based computer

Microsoft Windows graphic

To start the computer and use the Recovery Console on x86-based or Itanium architecture-based computers

  1. Insert the Setup CD and restart the computer from the CD drive.
  2. When the text-based part of Setup begins, follow the prompts; choose the repair or recover option by pressing R.
  3. If you have a dual-boot or multiple-boot system, choose the installation that you need to access from the Recovery Console.
  4. When prompted, type the password for the local administrator account.
  5. At the system prompt, type the relevant Recovery Console commands; type help for a list of commands or help commandname for help about a specific command.
  6. To exit the Recovery Console and restart the computer, type exit.

Important

  • Because the Recovery Console is quite powerful, it is recommended for use only by advanced users or administrators.
  • In most cases, you will need the password for the built-in administrator account to use the Recovery Console.

  • You can set the Recovery console: Allow automatic administrative logon setting in the Security Options section of Local Security Settings. Changing this setting will allow you to start the Recovery Console without having to provide the administrator password. For more information, see "Recovery console: Allow automatic administrative logon" and "Edit local security settings" in Related Topics at the bottom of this page.

    Be careful when enabling this option. This will allow anyone with physical access to a computer to boot into the Recovery Console and access the Recovery Console commands.

Related Topics